#include <stdio.h>

int main(int argc, char *argv[]) 
{
	int c[10],Max,Min,e=0;
	
	scanf("%d",&c[0]);
	Max=Min=e=c[0];
	for(int i=1;i<=9;i++)
	{
		scanf("%d",&c[i]);
		if(Max<c[i])Max=c[i];
		if(Min>c[i])Min=c[i];
		e=e+c[i];
	}
	e=(e-Max-Min)/8;
	printf("Canceled Max Score:%d\n",Max);
	printf("Canceled Min Score:%d\n",Min);
	printf("Average Score:%d\n",e);
}